# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sipgrep
pkgver=2.2.0
pkgrel=0
pkgdesc="Display and Troubleshoot SIP signaling over IP networks in console"
url="https://www.sipcapture.org/"
arch="all"
license="GPL-3.0-only"
makedepends="pcre2-dev libpcap-dev ncurses-dev openssl-dev hiredis-dev
autoconf automake libtool m4"
options="!check" #no test provided
source="$pkgname-$pkgver.tar.gz::https://github.com/sipcapture/sipgrep/archive/$pkgver.tar.gz
aclocal.patch"

prepare() {
	sh build.sh
	libtoolize
	default_prepare
}

build() {
	./configure \
		--prefix=/usr \
		--enable-ncurses \
		--enable-ssl \
		--enable-ipv6 \
		--enable-redis \
		--enable-shared \
		--disable-static \
		--with-gnu-ld
	make
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
fe146622e87012641648ef8a19f9d1477354059e60e5e15eaabbd6c4067c776dbcb8aafb0eb4c8ce096058a6f43edb929135a475c2c3afd847b46638c83339e5  sipgrep-2.2.0.tar.gz
44662d2696841cfb93ceb265d9f2201a73c01882894b179c02dc5e7040c39d19e66d56760fe752fe631796b099dee0b89a746c72742f634b54a7be4bab43b2fb  aclocal.patch
"
